package cn.edu.dzkd.software.service;

import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;
import java.sql.Timestamp;
import java.util.Date;

public class Test {

    public static void main(String[] args) {
//        String md5Code = DigestUtils.md5DigestAsHex("123456".getBytes(StandardCharsets.UTF_8));
//        System.out.println(md5Code);   // e10adc3949ba59abbe56e057f20f883e
//        md5Code = DigestUtils.md5DigestAsHex(md5Code.getBytes(StandardCharsets.UTF_8));
//        System.out.println(md5Code);   // 14e1b600b1fd579f47433b88e8d85291
        // e10adc3949ba59abbe56e057f20f883e
        // e10adc3949ba59abbe56e057f20f883e
        Timestamp timestamp = new Timestamp(System.currentTimeMillis());
        System.out.println(timestamp);
        Date date = new Date();
        System.out.println(date);
        java.sql.Date date1 = new java.sql.Date(System.currentTimeMillis());
        System.out.println(date1);
    }
}
